package de.ivo.maps;

import java.util.HashMap;
import java.util.Map;

import de.ivo.enums.Role;

public class Mapping {
	private Map<Role, String> map = new HashMap<Role, String>();

	public void setMap(String role, String value) {

		if (role.equalsIgnoreCase("admin")) {
			map.put(Role.ADMIN, value);
		} else if (role.equalsIgnoreCase("user")) {
			map.put(Role.USER, value);
		} else if (role.equalsIgnoreCase("guest")) {
			map.put(Role.GUEST, value);
		} else {
			
			assert (false) : "This should not be happening";
			throw new AssertionError(role == null||role.equals("") ? "role is null"
					: "something unexpected happened");
		}

	}

	public Map<Role, String> getMap() {
		return map;
	}

}
